<template>
  <div>
    <el-dropdown>
      <span class="el-dropdown-link">
        <i class="el-icon-toilet-paper" />
      </span>
      <el-dropdown-menu slot="dropdown" class="user-dropdown">
        <el-dropdown-item :disabled="$i18n.locale === 'zh'" @click.native="langHandle('zh')">中文</el-dropdown-item>
        <el-dropdown-item :disabled="$i18n.locale === 'en'" @click.native="langHandle('en')">英文</el-dropdown-item>
        <!-- <el-dropdown-item :disabled="$i18n.locale === 'ja'" @click.native="langHandle('ja')">日文</el-dropdown-item> -->
      </el-dropdown-menu>
    </el-dropdown>
  </div>
</template>

<script>
export default {
  name: 'Lang',

  data() {
    return {

    }
  },

  mounted() {

  },

  methods: {
    langHandle(lang) {
      // console.log(this.$li8n.locale, 8888)
      this.$i18n.locale = lang
    }
  }
}
</script>

<style lang="scss" scoped>
.el-icon-toilet-paper {
    margin: 5px;
    color: #fa5532;
    font-size: 30px;
}
</style>
